<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>

	<link rel="stylesheet" href="http://localhost/shop/Public/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="http://localhost/shop/Application/Admin/View/Public/Css/common.css" />
	<script type='text/javascript' src='http://localhost/shop/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/shop/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/shop/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/shop/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/shop/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/shop/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/shop/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/shop';
WEB = 'http://localhost/shop/index.php';
URL = 'http://localhost/shop/index.php/Admin/Goods/add';
APP = 'http://localhost/shop/Application';
COMMON = 'http://localhost/shop/Application/Common';
HDPHP = 'http://localhost/shop/hdphp';
HDPHPDATA = 'http://localhost/shop/hdphp/Data';
HDPHPEXTEND = 'http://localhost/shop/hdphp/Extend';
MODULE = 'http://localhost/shop/index.php/Admin';
CONTROLLER = 'http://localhost/shop/index.php/Admin/Goods';
ACTION = 'http://localhost/shop/index.php/Admin/Goods/add';
STATIC = 'http://localhost/shop/Static';
HDPHPTPL = 'http://localhost/shop/hdphp/Lib/Tpl';
VIEW = 'http://localhost/shop/Application/Admin/View';
PUBLIC = 'http://localhost/shop/Application/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/shop/Application/Admin/View/Goods';
HISTORY = 'http://localhost/shop/index.php/Admin';
</script>
	<script type="text/javascript" src='http://localhost/shop/Application/Admin/View/Public/Js/goods.js'></script>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<form action="" method='post'>
		<fieldset>
			<legend>添加商品</legend>
			<table class='table table-bordered table-hover'>
				<thead>
					<tr>
						<th colspan="2" class="btn btn-primary">基本信息</th>
					</tr>
				</thead>
				<tbody>
					<tr class="info">
						<td>所属分类</td>
						<td>
							<select name="cid">
								<option value="0">-请选择-</option>
								<?php if(is_array($cateData)){?><?php  foreach($cateData as $key=>$v){ ?>
									<option value="<?php echo $v['cid'];?>" pid='<?php echo $v['pid'];?>' tid='<?php echo $v['tid'];?>'>
									<?php echo $v['_name'];?></option>
								<?php }}?>
							</select>
						</td>
					</tr>
					<tr class="info">
						<td>所属品牌</td>
						<td>
							<select name="bid">
								<option value="0">-请选择-</option>
								<?php if(is_array($brandData)){?><?php  foreach($brandData as $key=>$v){ ?>
									<option value="<?php echo $v['bid'];?>"><?php echo $v['bname'];?></option>
								<?php }}?>
							</select>
						</td>
					</tr>
					<tr class="info">
						<td>商品名称</td>
						<td>
							<input type="text" name='gname'/>
						</td>
					</tr>
					<tr class="info">
						<td>单位</td>
						<td>
							<input type="text" name='unit' value='件'/>
						</td>
					</tr>
					<tr class="info">
						<td>市价场</td>
						<td>
							<input type="text" name='marketprice'/>
						</td>
					</tr>
					<tr class="info">
						<td>商城价</td>
						<td>
							<input type="text" name='shopprice'/>
						</td>
					</tr>
					<tr class="info">
						<td>点击次数</td>
						<td>
							<input type="text" name='click'/>
						</td>
					</tr>
				</tbody>
			</table>

			<p class="btn btn-primary">商品属性</p>
			<table class="table table-bordered table-hover" id='attr' class="info">
				
			</table>
			<p class="btn btn-primary">商品规格</p>
			<table class="table table-bordered table-hover" id='spec'>
				
			</table>

			<table class='table table-bordered'>
				<tr>
					<th colspan="3" class="btn btn-primary">列表图</th>
				</tr>
				<tr class="info">
					<!-- <td>上传图片</td> -->
					<td>
						<!-- <input type="file" name='pic' id='pic'/> -->
						<link rel="stylesheet" type="text/css" href="http://localhost/shop/hdphp/Extend/Org/Uploadify/uploadify.css" />
            <script type="text/javascript" src="http://localhost/shop/hdphp/Extend/Org/Uploadify/jquery.uploadify.min.js"></script>
            <script type="text/javascript">
            var HDPHP_CONTROL         = "http://localhost/shop/index.php?m=Admin&c=Goods&a=hd_uploadify";
            var UPLOADIFY_URL    = "http://localhost/shop/hdphp/Extend/Org/Uploadify/";
            var HDPHP_UPLOAD_THUMB    ="";
HDPHP_UPLOAD_TOTAL = 0</script>
            <script type="text/javascript" src="http://localhost/shop/hdphp/Extend/Org/Uploadify/hd_uploadify.js"></script>
<script type="text/javascript">
    $(function() {
        hd_uploadify_options.removeTimeout  =0;//提示框消息时间
        hd_uploadify_options.fileSizeLimit  ="5MB";
        hd_uploadify_options.fileTypeExts   ="*.jpg;*.png;*.gif";
        hd_uploadify_options.showalt        =0;
        hd_uploadify_options.uploadLimit    =1;
        hd_uploadify_options.input_type    ="input";
        hd_uploadify_options.elem_id    ="";
        hd_uploadify_options.success_msg    ="正在上传...";//上传成功提示文字
        hd_uploadify_options.formData ={water : "",fileSizeLimit:5242880, someOtherKey:1,PHPSESSID:"t69ldo2732d52uc4hb2stuvc12",upload_dir:"Updata/pic",hdphp_upload_thumb:""};
        hd_uploadify_options.thumb_width =100;
        hd_uploadify_options.thumb_height          =100;
        hd_uploadify_options.uploadsSuccessNums = 0;
        $("#hd_uploadify_pic").uploadify(hd_uploadify_options);
        });
</script>
<input type="file" name="up" id="hd_uploadify_pic"/><div class="hd_uploadify_pic_msg num_upload_msg"><input type="checkbox" id="add_upload_water" uploadify_id="hd_uploadify_pic" /><strong style="color:#03565E">是否添加水印</strong> <span></span>单文件最大<strong>5MB，允许上传类型*.jpg;*.png;*.gif</strong></div><div id="hd_uploadify_pic_queue"></div>
        <div class="hd_uploadify_pic_files uploadify_upload_files" input_file_id ="hd_uploadify_pic">
            <ul></ul>
            <div style="clear:both;"></div>
        </div>
					</td>
					<td id='pic-list'></td>
				</tr>
			</table>

			<table class='table table-bordered'>
				<tr>
					<th colspan="3" class="btn btn-primary">商品图册</th>
				</tr>
				<tr class="info">
					<!-- <td>上传图片</td> -->
					<td>
						<!-- <input type="file" name='photo' id='photo' /> -->
						
<script type="text/javascript">
    $(function() {
        hd_uploadify_options.removeTimeout  =0;//提示框消息时间
        hd_uploadify_options.fileSizeLimit  ="5MB";
        hd_uploadify_options.fileTypeExts   ="*.jpg;*.png;*.gif";
        hd_uploadify_options.showalt        =0;
        hd_uploadify_options.uploadLimit    =5;
        hd_uploadify_options.input_type    ="input";
        hd_uploadify_options.elem_id    ="";
        hd_uploadify_options.success_msg    ="正在上传...";//上传成功提示文字
        hd_uploadify_options.formData ={water : "",fileSizeLimit:5242880, someOtherKey:1,PHPSESSID:"t69ldo2732d52uc4hb2stuvc12",upload_dir:"Updata/photo",hdphp_upload_thumb:""};
        hd_uploadify_options.thumb_width =100;
        hd_uploadify_options.thumb_height          =100;
        hd_uploadify_options.uploadsSuccessNums = 0;
        $("#hd_uploadify_photo").uploadify(hd_uploadify_options);
        });
</script>
<input type="file" name="up" id="hd_uploadify_photo"/><div class="hd_uploadify_photo_msg num_upload_msg"><input type="checkbox" id="add_upload_water" uploadify_id="hd_uploadify_photo" /><strong style="color:#03565E">是否添加水印</strong> <span></span>单文件最大<strong>5MB，允许上传类型*.jpg;*.png;*.gif</strong></div><div id="hd_uploadify_photo_queue"></div>
        <div class="hd_uploadify_photo_files uploadify_upload_files" input_file_id ="hd_uploadify_photo">
            <ul></ul>
            <div style="clear:both;"></div>
        </div>
					</td>
					<td id='photo-list'></td>
				</tr>
			</table>

			<table class='table'>
				<tr class="next_show">
					<th class="btn btn-primary">商品详细</th>
				</tr>
				<tr class="hide info">
					<td>
						<script type="text/javascript" charset="utf-8" src="http://localhost/shop/hdphp/Extend/Org/Ueditor/ueditor.config.js"></script><script type="text/javascript" charset="utf-8" src="http://localhost/shop/hdphp/Extend/Org/Ueditor/ueditor.all.min.js"></script><script type="text/javascript">UEDITOR_HOME_URL="http://localhost/shop/hdphp/Extend/Org/Ueditor/"</script><script id="hd_intro" name="intro" type="text/plain"></script>
        <script type='text/javascript'>
        $(function(){
                var ue = UE.getEditor('hd_intro',{
                serverUrl:'http://localhost/shop/index.php?m=Admin&c=Goods&a=ueditor_upload&water='//图片上传脚本
                ,zIndex : 1000
                ,initialFrameWidth:"100%" //宽度1000
                ,initialFrameHeight:"300" //宽度1000
                ,imagePath:''//图片修正地址
                ,autoHeightEnabled:false //是否自动长高,默认true
                ,autoFloatEnabled:false //是否保持toolbar的位置不动,默认true
                ,toolbars:[
            ['fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset',
            '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', '|',
            'lineheight', '|','paragraph', 'fontfamily', 'fontsize', '|',
             'indent','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
            'link', 'unlink', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'insertimage', 'emotion',   'map',  'insertcode',  'pagebreak','horizontal', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow',  'insertcol',  'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols']
            ]//工具按钮
//                ,enableAutoSave: false//关闭自动保存
                ,initialStyle:'p{line-height:1em; font-size: 14px; }'
            });
        })
        </script>
					</td>
				</tr>
			</table>

			<table class='table'>
				<tr class="next_show">
					<th class="btn btn-primary">售后服务</th>
				</tr>
				<tr class="hide info">
					<td>
						<script id="hd_service" name="service" type="text/plain"></script>
        <script type='text/javascript'>
        $(function(){
                var ue = UE.getEditor('hd_service',{
                serverUrl:'http://localhost/shop/index.php?m=Admin&c=Goods&a=ueditor_upload&water='//图片上传脚本
                ,zIndex : 1000
                ,initialFrameWidth:"100%" //宽度1000
                ,initialFrameHeight:"300" //宽度1000
                ,imagePath:''//图片修正地址
                ,autoHeightEnabled:false //是否自动长高,默认true
                ,autoFloatEnabled:false //是否保持toolbar的位置不动,默认true
                ,toolbars:[
            ['fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset',
            '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', '|',
            'lineheight', '|','paragraph', 'fontfamily', 'fontsize', '|',
             'indent','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
            'link', 'unlink', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'insertimage', 'emotion',   'map',  'insertcode',  'pagebreak','horizontal', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow',  'insertcol',  'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols']
            ]//工具按钮
//                ,enableAutoSave: false//关闭自动保存
                ,initialStyle:'p{line-height:1em; font-size: 14px; }'
            });
        })
        </script>
					</td>
				</tr>
			</table>
			<input type="hidden" name='aid' value='<?php echo $_SESSION['aid'];?>'/>
			<input type="hidden" name='tid' value='0'/>
			<input type="submit" value="确认添加" class="btn btn-primary btn-block btn-large" />
		</fieldset>
	</form>

	</div>
	</div>
	</div>
</body>
</html>